package com.showcai.service.impl;

import com.showcai.dao.PrizesMapper;
import com.showcai.module.Prizes;
import com.showcai.myRunTime.MyRunTimeExcption;
import com.showcai.service.DrawGameService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.*;
@Service("chouqianService")
public class ChouqianServiceImpl extends DrawGameBase implements DrawGameService {
    @Autowired
    PrizesMapper prizesMapper;

private  static final Integer PRIZES_SIZE=76;
private  static final String PIC_PATH="/static/img/chouqian/";

    @Override
    public Prizes actionDraw(Long userId, Long activityId) throws MyRunTimeExcption {
        List<Prizes> prizesList = new ArrayList<>();
        for(int i=1;i<PRIZES_SIZE+1;i++){
            Prizes prizes=new Prizes();
            prizes.setPicUrl(PIC_PATH+i+".png");
            prizesList.add(prizes);
        }
        Prizes prizes = super.randomPrizes(prizesList);
        return prizes;
    }

    @Override
    public void awardsPrizes(Prizes prizes, Long userId) throws MyRunTimeExcption {

    }
}
